package com.ruoyi.car.mapstruct;

import com.ruoyi.car.controller.admin.model.vo.CarModelAddReq;
import com.ruoyi.car.controller.admin.model.vo.CarModelEditReq;
import com.ruoyi.car.controller.admin.model.vo.CarModelResp;
import com.ruoyi.car.entity.CarModel;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Author wy
 * @Description TODO
 * @Date 2023/6/5 15:55
 * @Version 1.0
 */
@Mapper
public interface CarModelConvert {

    CarModelConvert INSTANCE= Mappers.getMapper(CarModelConvert.class);


    /**
     * 把List<CarModel> 转换为  List<CarModelResp>
     * @param list
     * @return
     */
    List<CarModelResp> convert(List<CarModel> list);

    /**
     * CarModelAddReq转换成实体类CarModel
     * @param req
     * @return
     */
    CarModel convert(CarModelAddReq req);

    /**
     * 转换
     * @param bean
     * @return
     */
    CarModelResp convert(CarModel bean);

    CarModel  convert(CarModelEditReq req);
}
